<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div
      id="box"
      ondblclick="console.log('双击');"
      onmousedown="console.log('鼠标按下')"
    >
      hello
    </div>
    <script>
      const box = document.getElementById("box");

      //   box.onclick = function () {
      //     console.log("单击");
      //   };

      //   box.ondblclick = function () {
      //     console.log("双击");
      //   };
      //   box.oncontextmenu = function () {
      //     console.log("右击");
      //   };

      //   box.onmousedown = function () {
      //     console.log("鼠标按下");
      //   };
      //   box.onmouseup = function () {
      //     console.log("鼠标抬起");
      //   };
    </script>
  </body>
</html>
